﻿using MobileControlGuru.AutoTask;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Quartz;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static MobileControlGuru.AutoTask.TaskJson;

namespace MobileControlGuru.Src
{
   
    public class TaskManagerJob : IJob
    {

        TaskManager taskManager;

 

        public   Task Execute(IJobExecutionContext context)
        {
            try
            {
                taskManager = TaskManager.Instance;
                if (taskManager != null)
                {
                    taskManager.LoopNext();
                }
            }
            catch (Exception ex)
            {
                Tools.LogHelper.Error(ex, context.JobDetail.Key.ToString());
                throw;
            }
          
            return Task.CompletedTask;
        }

   
    }

}
